<?php
require APP_PATH . "core/classes/ControllerBase.php";
require APP_PATH . "app/Home/Model/Subject_Type_Selection.model.php";
class IndexController extends ControllerBase{
	
	public function __construct(){
		parent::__construct();
	}
	
	public function index(){
		
		// 这里获取数据库数据
		
		$model = new SubjectTypeSelection("city");
		$data = $model->pagination(10, 1);
		
		$this->view->assign('data', $data);
		
		$this->view->display("index.tpl");
	}
	
	private function userAuth(){
		
	}
	
	public function userLogin(){
		if(isset($_POST['user']) && isset($_POST['pass'])){
			header("location: ./index.php");
		}else{
			$this->view->display("login.tpl");
		}
	}
}